package com.djk.pojo;

/**
 * 定义响应码的枚举类
 */
public enum ResultCodeEnum {
    SUCCESS(200, "成功"),
    ERROR(500, "用户名或密码有误"),
    USERNAME_USED(400, "用户名被占用"),
    USERNAME_ERROR(401, "用户名错误"),
    PASSWORD_ERROR(403,"密码错误");

    private Integer code;
    private String msg;

    ResultCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
